<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<s:head theme="xhtml"/>
 <sx:head parseContent="true"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="js/datetimepicker.js">   </script>
<script type="text/javascript" src="js/livevalidation.js">   </script>
<script type="text/javascript">
window.name='principal';


function f_registrar(){	
	//document.forms[0].action='solicitud.do';
	document.forms[0].metodo.value='registrar';
	document.forms[0].submit();
}
function mostrarFecha(){
	var obDat = new Date();
	var dia = obDat.getDate();
	var mes = obDat.getMonth() + 1;
	var anho = obDat.getFullYear();
	if(dia < 10)
		dia = "0" + dia;
	if(mes < 10)
		mes = "0" + mes;
	document.forms[0].fecha.value = dia + "/" + mes + "/" + anho;
}
</script>

</head>
<body >

<h1>Mantenimiento de Clientes</h1>
	<s:form  theme="simple"  >
	<table align="center">
	<tr><td ><font color="red"> 
	       	<s:fielderror/> 	 	
	        <s:actionerror/>
	        <s:actionmessage/>
	</font></td></tr>
	</table>
	<table  width="50%" >
	
	
	
		<s:if test="cliente.id!='0'">
			<td align="left"  >Codigo Cliente:  </td>
			<td colspan="3" align="left"><s:textfield name="cliente.id"    ></s:textfield> 
			<script type="text/javascript">
	            var representante = new LiveValidation('cliente_cliente_id');
	            representante.add(Validate.Presence);
	          </script> 
	         </td>
		</s:if>
		
		
		
		<tr>
			<td align="left"  >Razon Social:  </td>
			<td colspan="3" align="left"><s:textfield name="cliente.razonSoc"    ></s:textfield> 
			<script type="text/javascript">
	            var representante = new LiveValidation('cliente_cliente_razonSoc');
	            representante.add(Validate.Presence);
	          </script> 
	         </td>
		</tr>
		
		<tr>
			<td align="left"  >Direccion:  </td>
			<td colspan="3" align="left"><s:textfield name="cliente.direccion"    ></s:textfield> 
			<script type="text/javascript">
	            var representante = new LiveValidation('cliente_cliente_direccion');
	            representante.add(Validate.Presence);
	          </script> 
	         </td>
		</tr>
		
		<tr>
			<td align="left"  >Telefono:  </td>
			<td colspan="3" align="left"><s:textfield name="cliente.telefono"    ></s:textfield> 
			<script type="text/javascript">
	            var representante = new LiveValidation('cliente_cliente_telefono');
	            representante.add(Validate.Presence);
	          </script> 
	         </td>
		</tr>
		
		
		
		
		<tr>
			<td colspan="4" align="left"> 
			
			<s:submit action="insertaCliente" value="Grabar"/>
			
		</tr>
	</table>
		
	</s:form>
</body>
</html>